var cover;

cover = function() {
  var win_height;
  win_height = void 0;
  win_height = $(window).height();
  if (win_height < 450) {
    $(".bg").height(450);
  } else {
    $(".bg").height(win_height);
  }
};

window.onscroll = function() {
  var t, win_height;
  t = void 0;
  win_height = void 0;
  t = document.documentElement.scrollTop || document.body.scrollTop;
  win_height = $(window).height();
  if (t > win_height - 1) {
    return $("#mynav").show();
  } else {
    return $("#mynav").hide();
  }
};

$("#scrollUp").on("click", function(e) {
  $("body,html").animate({
    scrollTop: 0
  }, 400);
});

$('.notinview').one("inview", function(e, isInView, visiblePartX, visiblePartY) {
  var fadeDiv;
  if (isInView) {
    fadeDiv = $(this);
    return setTimeout((function() {
      return fadeDiv.fadeTo(600, 1);
    }), 800);
  }
});

$("#mynav").hide();

cover();

$(window).resize(function() {
  return cover();
});
